<?php include("includes/session.php"); ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $lang['PAGE_TITLE_FEEDBACK']; ?></title>
<?php include("header.php"); ?>
<br /><br />
<center>
<table cellpadding="10" cellspacing="0" class="border" width="85%">
<tr>
	<td align="left">
	<?php
	if(isset($_SESSION['feedbacksuccess']))
	{
		if($_SESSION['feedbacksuccess'])
		{
			echo "<br />";
			echo "<center><h1>Feedback Submitted</h1></center>";
			echo "<br />";
			echo "<center><p>Thank you for submitting your feedback. <a href=\"feedback.php\">Feedback</a></p></center>";
		}
		else
		{
			echo "<br />";
			echo "<center><h1>Feedback Submission Failed</h1></center>";
			echo "<br />";
			echo "<center><p>Sorry, your feedback failed to be submitted. <a href=\"feedback.php\">Feedback</a></p></center>";
			echo "<center>Please try again later.</center>";
		}
		unset($_SESSION['feedbacksuccess']);
	}
	else
	{
	?>
		<center><h2>Feedback</h2></center>
		<center>
		<table cellpadding="0" cellspacing="0" width="75%">
		<tr><td>
<?php echo $lang['LINKS_COLLAB']; ?>
			<br /><br />
<?php echo $lang['LINKS_COLLAB2']; ?>
		<br /><br />
<?php echo $lang['LINKS_THANKS']; ?>
		</td></tr>
		</table>
		</center><br />
		<center>
		<form action="includes/process.php" method="POST">
		<table border="0" cellspacing="0" cellpadding="3">
		<?php if(!$session->logged_in)
		{
		?>
		<tr>
			<td style="padding-left: 0px;padding-right: 0px;">
			<table cellpadding="3" cellspacing="0" width="100%">
			<tr>
				<td><b>Name:</b><? echo $form->error("name"); ?></td>
				<td><b>E-mail:</b><? echo $form->error("email"); ?></td>
			</tr>
			<tr>
				<td><input type="text" name="name" maxlength="30" size="23" value="<? echo $form->value("name"); ?>"></td>
				<td><input type="text" name="email" maxlength="50" size="50" value="<? echo $form->value("email"); ?>"></td>
			</tr>
			</table>
			</td>
		</tr>
		<?php
		}
		?>
		<tr>
			<td><b>Subject:</b><? echo $form->error("subject"); ?></td>
		</tr>
		<tr>
			<td><input type="text" name="subject" size="79" maxlength="50" value="<? echo $form->value("subject"); ?>"></td>
		</tr>
		<tr>
			<td><b>Feedback:</b><? echo $form->error("feedback"); ?></td>
		</tr>
		<tr>
			<td><textarea name="feedback" cols="60" rows="10"><? echo $form->value("feedback"); ?></textarea></td>
		</tr>
		<?php if(!$session->logged_in)
		{
		?>
		<tr>
			<td>
			<table cellpadding="0" cellspacing="0" width="60%">
			<tr>
				<td>
				<table cellpadding="3" cellspacing="0">
				<tr>
					<td><b>Captcha:</b><? echo $form->error("security_code"); ?></td>
				</tr>
				<tr>
					<td><input name="security_code" type="text" /></td>
				</tr>
				</table>
				</td>
				<td><img src="includes/Captcha/CaptchaSecurityImages.php?width=100&height=40&characters=5" /></td>
			</tr>
			</table>
			</td>
		</tr>
		<?php
		}
		?>
		<tr>
			<td align="right">
				<input type="hidden" name="subAddFeedback" value="<?php echo $session->username; ?>">
				<input type="submit" value="Submit Feedback">
			</td>
		</tr>
		<tr>
			<td colspan="2" align="left"></td>
		</tr>
		</table>
		</form>
		</center>
	<?php
	}
	?>
	</td>
</tr>
</table>
</center>
<?php include("footer.php"); ?>